package class1;

public class thisdemo {
    public static void main(String[] args) {
        Student s1 = new Student();
        System.out.println(s1);
        s1.printThis();
    }
}//this用来解决对象名与成员名冲突;

//例如!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//public class student {
//    double score;
//}
//public void judge(double score) {
//    if(score > score) {//这里score冲突,故this.score代表该类中的成员,而score代表调用时的传参.
//        System.out.println("考上了");
//    }
//    else {
//        System.out.println("没考上");
//    }
//}